<template>
  <div class="singer-home">
    <van-nav-bar
      title="歌单详情"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <img :src="singer.singer_pic" alt="">
    <van-tabs v-model="active">
      <van-tab title="百科">
        <SingerIntro :singerId="id"></SingerIntro>
      </van-tab>
      <van-tab title="歌曲">
        <SingerSong :singerId="id"></SingerSong>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import SingerSong from "./components/SingerSong.vue";
import SingerIntro from "./components/SingerIntro.vue";
export default {
    data() {
        return {
            active: 0,
            id: this.$route.params.id,
            singer:{}
        }
    },
    created(){
        this.singer = this.$store.state.singer
    },

    methods: {
        onClickLeft() {
            this.$router.go(-1)
        }
    },
    components: {
        SingerSong,
        SingerIntro
    }
};
</script>

<style scoped>
</style> 